package com.library.mapper;

import com.library.bean.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;


public interface BookInfoMapper {


    @Select("select count(*) from book_info")
    Integer returnAllBookNum();

    @Select("select * from book_info limit #{start},#{size}")
    ArrayList<Book> findByCurrentPageStart(@Param("start") int start,@Param("size") int size);

    @Select("select count(*) from book_info where name like #{search} or author like #{search} or introduction like #{search}")
    Integer select(String search);
}
